/**
 * @file BlockSubscriptionHandler.cs
 * @author Zane Mayo
 * @date 26/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class BlockSubscriptionHandler : Handler {
		
		private static log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
		
		private int contactId;
		// Todo Remove This, debugging
		private string contactAddress;
		
		public BlockSubscriptionHandler() : base( typeof( BlockSubscriptionProtocolMessage ) )  {
		}
		
		public BlockSubscriptionHandler( int contactId ) : base( typeof( BlockSubscriptionProtocolMessage ) )  {
			this.contactId = contactId;
		}

				
		public BlockSubscriptionHandler( string contactAddress ) : base( typeof( BlockSubscriptionProtocolMessage ) )  {
			this.contactAddress = contactAddress;
		}
		
		public override ProtocolMessage CreateRequestProtocolMessage() {
			BlockSubscriptionProtocolMessage blockSubscriptionProtocolMessage = new BlockSubscriptionProtocolMessage();
			//blockSubscriptionProtocolMessage.ContactAddress = Contacts.Instance.GetContact( contactId ).ContactAddress;
			
			// Todo Remove this, debugging
			if ( contactAddress != null ) {
				blockSubscriptionProtocolMessage.ContactAddress = contactAddress;
			}
			
			return blockSubscriptionProtocolMessage;
		}

		
	}
}